package edu.hit.stu.controller;

import edu.hit.stu.hander.exception.WebFluxException;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

import java.util.Date;

@RestController
public class ExceptionResource {

    @GetMapping(path = "/error/custorm")
    public Mono<String> throwException() {
        throw new WebFluxException("测试" + this.getClass().toString() + "\n" + "时间为:" + new Date());
//        return Mono.just("测试ExceptionResource.throwException");
    }
}
